<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/11/22
 * Time: 17:36
 */
class CtlRecordLog extends BaseController{
    public function eventRecord()
    {
        //echo json_encode(array("ret"=>true,"msg"=>"msg"));
        //exit;
        /*$log_params["target_client_id"] = "all";
          $log_params["target_user_name"] = "all";
          $log_params["client_id"] = "12321";
          $log_params["user_name"] = "xiao hui hui";
          $log_params["channel_id"] = 1;
          $log_params["msg"] = "hello";
          $log_params["log_time"] = time();
          $recordMod = new ModRecordLog();
          $recordMod->addLog("log_chat",$log_params);
        */
        $data["event_id"] = $this->R("event_id", 'error');
        $recordMod = new ModRecordLog();
    }

    public function getChatLog(){
        $log_params["room_id"] = $this->R("room_id");
        //$log_params["room_id"] = 1;
        $recordMod = new ModRecordLog();
        $result = array();
        $result = $recordMod->queryChatLog($log_params);
        $msg["ret"] = true;
        $msg["msg"] = "success";
        $msg["data"] = $result;
        echo json_encode($msg);
        exit;
    }
}